<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of MenuServiceImpl
 *
 * @author krisada.thiangtham
 */
class MenuServiceImpl {

    //put your code here
    private $dispatcher;

    public function __construct(MenuDao $dispatcher) {
        return $this->dispatcher = $dispatcher;
    }

    public function action($action) {
        return $this->dispatcher->dispatch($action);
    }

    public function createNewMenu($menuTO) {
        return $this->dispatcher->createNewMenu($menuTO);
    }

    public function deleteMenu($menuID) {
        return $this->dispatcher->deleteMenu($menuID);
    }

    public function updateMenu($menuTO) {
        return $this->dispatcher->updateMenu($menuTO);
    }

    function createNewMenuLevel1($menuTO) {
        return $this->dispatcher->createNewMenuLevel1($menuTO);
    }

    function updateMenuLevel1($menuTO) {
        return $this->dispatcher->updateMenuLevel1($menuTO);
    }

    function deleteMenuLevel1($menuID) {
        return $this->dispatcher->deleteMenuLevel1($menuID);
    }

    function createNewMenuLevel2($menuTO) {
        return $this->dispatcher->createNewMenuLevel2($menuTO);
    }

    function updateMenuLevel2($menuTO) {
        return $this->dispatcher->updateMenuLevel2($menuTO);
    }

    function deleteMenuLevel2($menuID) {
        return $this->dispatcher->deleteMenuLevel2($menuID);
    }

    function getAllMenu() {
        return $this->dispatcher->getAllMenu();
    }

    function getAllMenuLevelOneByMainMenuID($mainMenuID) {
        return $this->dispatcher->getAllMenuLevelOneByMainMenuID($mainMenuID);
    }

    function getAllMenuLevelTwoByMainMenuID($mainMenuID) {
        return $this->dispatcher->getAllMenuLevelTwoByMainMenuID($mainMenuID);
    }

}
